package com.gxljc.bear.crawler.weixin;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 16-7-29
 * Time: 上午11:35
 * To change this template use File | Settings | File Templates.
 */
public class WeixinConst {
    public final static int CRAWL_TIMEOUT = 30000; //爬取timeout时间
    public final static int MAX_SINGLE_CORE = 50;
    public final static String MONGODB_TABLE_ACCOUNT = "t_public_number_account";
    public final static String MONGODB_TABLE_PAGE = "t_public_number_page";
    public final static String MONGODB_NEWRANK_PAGE = "t_newrank_page";
    public final static String MONGODB_SOGOU_PAGE = "t_sogou_page";
    public final static String WEIXIN_QQ_DOMAIN = "http://mp.weixin.qq.com/";
    public final static String HBASE_TABLE_PAGE = "gxljc.weixin.account.page";
    public final static String WEIXIN_MOBILE_REDIS_KEY_HIS_URLS = "bear:crawler:wxhistory";    // 历史链接的redis_key
    public final static String WEIXIN_MOBILE_PAGE = "t_mobile_weixin_page";    // 保存的mongodb表格
    public final static String HBASE_FAMILY_DATA = "data";
    public final static int MAX_WEIXIN_PAGE_FAIL_TIME = 5; //微信文章最大失败访问次数

    public final static String WEIXIN_QR_URL = "http://open.weixin.qq.com/qr/code/?username=%s";

    public final static String CRAWLER_FIRST_URL = "http://weixin.sogou.com/";
    public final static String SEARCH_URL = "http://weixin.sogou.com/weixin?type=1&query=%s&ie=utf8&_sug_=n&_sug_type_=";
    public final static String NEWRANK_ACCOUNT_URL = "http://www.newrank.cn/public/info/detail.html?account=%s";  //新榜账号URL
    public final static String NEWRANK_PAGE_URL = "http://www.newrank.cn/xdnphb/detail/getAccountArticle?uuid=%s&nonce=%s&xgxljc=%s&flag=%s"; //新榜文章URL

    public static enum SCHEMA_COLUMN_NAME {    //字段内部名
        CRAWL_URL("crawlUrl"), CRAWL_FLAG("crawlFlag"), BIZ("biz"), ACCOUNT_ID("accountId"), HTML("html"), ORG_URL("orgUrl"),
        ORIGINAL("original"), ACCOUNT_NAME("accountName"), TITLE("title"), RSYNC("rsync"), FAIL_TIME("failTime"), WID("wid"), PUBLISH_DATE("publishDate"),;
        private final String value;

        private SCHEMA_COLUMN_NAME(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }
}
